	
	public Image logoImg;
	
	#ifdef USE_DRAWRGB
	public static int logo_alphaLevel = LOGO.ALPHA_LEVEL_START;
	public static boolean logo_fadeIn = true;
	public static long fadeInEnd = 0;
	#else
	public static long logoTimeStart = 0;
	#endif
	
	public void UpdateLogo()
	{
		cGame_g.setColor(LOGO.BACKGROUND_COLOR);
		cGame_g.fillRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
		try
		{
			if(logoImg == null)
				logoImg = Image.createImage(SPRITES.LOGO_IMAGE);
		}
		catch(Exception e)
		{
		}
				
		cGame_g.drawRegion(logoImg, SPRITES.LOGO_MODULE_X, SPRITES.LOGO_MODULE_Y, SPRITES.LOGO_MODULE_W, SPRITES.LOGO_MODULE_H, 0, LOGO.X, LOGO.Y, 0);
		
		#ifdef USE_DRAWRGB
		if(logo_fadeIn && logo_alphaLevel > LOGO.ALPHA_LEVEL_END)
			logo_alphaLevel-=LOGO.ALPHA_STEP;
		else if(logo_alphaLevel == 0)
		{
			if(fadeInEnd == 0)
				fadeInEnd = System.currentTimeMillis();
			logo_fadeIn = false;
		}
			
		if(!logo_fadeIn && logo_alphaLevel < LOGO.ALPHA_LEVEL_START && System.currentTimeMillis() - fadeInEnd > LOGO.SHOW_TIME)
			logo_alphaLevel+=LOGO.ALPHA_STEP;
		
		cGame_g.setColor(LOGO.BACKGROUND_COLOR);
		cGame_g.drawAlphaRect(LOGO.X, LOGO.Y, SPRITES.LOGO_MODULE_W, SPRITES.LOGO_MODULE_H, logo_alphaLevel);
		
		if(logo_alphaLevel == LOGO.ALPHA_LEVEL_START)
		#else
		if(logoTimeStart == 0)
			logoTimeStart = System.currentTimeMillis();
		
		if(System.currentTimeMillis() - logoTimeStart > LOGO.SHOW_TIME)
		#endif
		{
			SetState(STATES.MAIN_LOADING);
			#ifdef USE_DRAWRGB
			logo_fadeIn = true;
			fadeInEnd = 0;
			#endif
		}
	}